package com.belf.console.domain;

import com.belf.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.ArrayList;
import java.util.List;

/**
 * 迁移报告信息对象 data_report_info
 * 
 * @author belf
 * @date 2024-08-21
 */
@Data
@EqualsAndHashCode(callSuper=false)
public class DataReportInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** $column.columnComment */
    
    private Long jobId;

    /** $column.columnComment */
    
    private Long taskId;

    /** $column.columnComment */
    
    private Integer code;

    /** $column.columnComment */
    
    private String typeName;

    /** $column.columnComment */
    
    private String message;

    /** $column.columnComment */
    
    private Integer completes;

    /** $column.columnComment */
    
    private Integer failtures;

    private Integer total;

    /** $column.columnComment */
    
    private String dataType;

    /** $column.columnComment */
    
    private String successRate;

    /** $column.columnComment */
    
    private Integer errorTipsCount;

    /** $column.columnComment */
    
    private String startTime;

    /** $column.columnComment */
    
    private String endTime;

    /** $column.columnComment */
    
    private String timeConsuming;

    private List<DataReportObject> successItems = new ArrayList<>();

    /** 子任务失败情况 */
    private List<DataReportObject> failureItems = new ArrayList<>();

    /** $column.columnComment */
    
    private Integer leave;

    public DataReportInfo(Long JobId, Long taskId) {
        this.jobId=JobId;
        this.taskId=taskId;
    }

    public DataReportInfo() {
    }

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setJobId(Long jobId) 
    {
        this.jobId = jobId;
    }

    public Long getJobId() 
    {
        return jobId;
    }
    public void setTaskId(Long taskId) 
    {
        this.taskId = taskId;
    }

    public Long getTaskId() 
    {
        return taskId;
    }
    public void setCode(Integer code) 
    {
        this.code = code;
    }

    public Integer getCode() 
    {
        return code;
    }
    public void setTypeName(String typeName) 
    {
        this.typeName = typeName;
    }

    public String getTypeName() 
    {
        return typeName;
    }
    public void setMessage(String message) 
    {
        this.message = message;
    }

    public String getMessage() 
    {
        return message;
    }
    public void setCompletes(Integer completes) 
    {
        this.completes = completes;
    }

    public Integer getCompletes() 
    {
        return completes;
    }
    public void setFailtures(Integer failtures) 
    {
        this.failtures = failtures;
    }

    public Integer getFailtures() 
    {
        return failtures;
    }
    public void setDataType(String dataType) 
    {
        this.dataType = dataType;
    }

    public String getDataType() 
    {
        return dataType;
    }
    public void setSuccessRate(String successRate) 
    {
        this.successRate = successRate;
    }

    public String getSuccessRate() 
    {
        return successRate;
    }
    public void setErrorTipsCount(Integer errorTipsCount) 
    {
        this.errorTipsCount = errorTipsCount;
    }

    public Integer getErrorTipsCount() 
    {
        return errorTipsCount;
    }
    public void setStartTime(String startTime) 
    {
        this.startTime = startTime;
    }

    public String getStartTime() 
    {
        return startTime;
    }
    public void setEndTime(String endTime) 
    {
        this.endTime = endTime;
    }

    public String getEndTime() 
    {
        return endTime;
    }
    public void setTimeConsuming(String timeConsuming) 
    {
        this.timeConsuming = timeConsuming;
    }

    public String getTimeConsuming() 
    {
        return timeConsuming;
    }
    public void setLeave(Integer leave) 
    {
        this.leave = leave;
    }

    public Integer getLeave() 
    {
        return leave;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("jobId", getJobId())
            .append("taskId", getTaskId())
            .append("code", getCode())
            .append("typeName", getTypeName())
            .append("message", getMessage())
            .append("completes", getCompletes())
            .append("failtures", getFailtures())
            .append("dataType", getDataType())
            .append("successRate", getSuccessRate())
            .append("errorTipsCount", getErrorTipsCount())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("timeConsuming", getTimeConsuming())
            .append("leave", getLeave())
            .toString();
    }
}
